<?php include('../../include/functions.inc.php'); ?>
<div id="assigns" style="width:80%;">
    <table class="table table-striped table-hover table-bordered" cellpadding="0" cellspacing="1">
        <tbody>
            <tr>
                <th >ID ASIGNACION</th>
                <th >CARRERA</th>
                <th colspan="3" >OPCIONES</th>
            </tr>  
            <?php
            $f = date('y-d-m');
            $where = "FK_STUDENT=" . sqlValue(getParam("ID"), "int");
            //$where.=" AND FK_CYCLE=" . $user->cycle;
            $where.=" AND FK_ENTITY=" . $user->entity;
            $where.=" AND STATUS=1";

            $head = $db->query_select("cllg_student_assign", $where, NULL);
//echo $db->lastQuery;
            foreach ($head as $c) {
                $career = getCareerName($c["FK_CAREER"], $db);

                $row = array("ID" => $c["ID"], "CARRERA" => $career);
                $json_string = json_encode($row);
                ?>
                <tr class="<?php #echo fmod($co, 2) == 0 ? 'data line0' : 'data line1'; ?>" >
                    <td><?php echo $row['ID']; ?></td>
                    <td><?php echo $row['CARRERA']. " - Ciclo ". $c['FK_CYCLE']; ?></td>
                    <td><a href="javascript:cancelAssign(<?php echo $row['ID']; ?>);" > Anular </a></td>
                    <td><a href="javascript:deleteAssign(<?php echo $row['ID']; ?>);" > Eliminar </a></td>
                    <td><a href="javascript:showCourses(<?php echo $row['ID']; ?>);" > Cargar </a></td>
                </tr> 
                <?php
            }
            ?>

        </tbody>
    </table>
</div>